Stylus and position calculation method

ABSTRACT

A stylus includes a processor that acquires first coordinate values in a pen coordinate system at an occurrence position of a pen event detected by a pen sensor and acquires second coordinate values in a device coordinate system at the occurrence position of the pen event. The processor uses a plurality of sets of coordinate value pairs to determine conversion parameters for converting coordinates from the pen coordinate system into the device coordinate system and uses the determined conversion parameters and a measured amount of movement of the stylus to calculate coordinate values of the stylus in the device coordinate system.

BACKGROUND Technical Field

The present disclosure relates to a stylus and a position calculationmethod using the stylus.

Background Art

Patent Document 1 discloses an electronic pen that digitalizes atrajectory (that is, a stroke) of a pen tip formed on special paperwhile reading a pattern on the special paper by using a camera providedon an apparatus.

PRIOR ART DOCUMENT Patent Document

[Patent Document 1]

Japanese Patent Laid-Open No. 2014-035557

BRIEF SUMMARY Problem to be Solved by the Disclosure

Incidentally, in relation to a position detection system with acombination of a stylus and an electronic device, the power consumptionon the stylus side tends to increase when the positional relationshipbetween the stylus and the electronic device is monitored while wirelesscommunication is performed in both directions between the stylus and theelectronic device. Therefore, it is desirable to provide a stylus thatcan calculate the relative position between the stylus and theelectronic device without monitoring the state around the apparatus andthat can autonomously select a suitable operation mode according to theobtained relative positional relationship.

However, the electronic pen disclosed in Patent Document 1 can justfigure out the relative position only in a positional relationship thatenables the pattern on the special paper to be recognized by using thecamera, and the electronic pen cannot autonomously calculate therelative position.

An object of the present disclosure is to provide a stylus and aposition calculation method that can autonomously calculate the relativeposition between the stylus and an electronic device.

Means for Solving the Problem

The first aspect of the present disclosure provides a stylus used withan electronic device that can detect a touch position in a devicecoordinate system, the stylus including: a pen sensor which, inoperation, detects a pen event (e.g., a pen-down event or a pen-upevent); an inertial sensor which, in operation, measures an amount ofmovement of the stylus in a pen coordinate system; and a processorwhich, in operation, acquires first coordinate values in the pencoordinate system at an occurrence position of the pen event detected bythe pen sensor, acquires second coordinate values in the devicecoordinate system at the occurrence position of the pen event,determines conversion parameters for converting coordinates from the pencoordinate system into the device coordinate system using a plurality ofsets of coordinate value pairs, the coordinate value pairs being pairsof the first coordinate values and the second coordinate values, andcalculates coordinate values of the apparatus on the device coordinatesystem using the conversion parameters determined and the amount ofmovement of the stylus measured.

The second aspect of the present disclosure provides a positioncalculation method performed by a stylus used with an electronic devicethat can detect a touch position in a device coordinate system. Themethod includes: detecting a pen event (e.g., a pen-down event or apen-up event); measuring an amount of movement of the stylus in a pencoordinate system; acquiring first coordinate values in the pencoordinate system at an occurrence position of the pen event detected,acquiring second coordinate values in the device coordinate system atthe occurrence position of the pen event, determining conversionparameters for converting coordinates from the pen coordinate systeminto the device coordinate system using a plurality of sets ofcoordinate value pairs, the coordinate value pairs being pairs of thefirst coordinate values and the second coordinate values; andcalculating coordinate values of the apparatus on the device coordinatesystem using the conversion parameters determined and the amount ofmovement of the stylus measured.

Effect of the Disclosure

According to the present disclosure, the relative position between theapparatus and the electronic device can be autonomously calculated.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an overall configuration diagram of a position detectionsystem provided with a stylus according to an embodiment of the presentdisclosure.

FIG. 2 is a diagram illustrating a positional relationship between a pencoordinate system and a device coordinate system.

FIG. 3 is a flow chart regarding a position calibration operation of thestylus illustrated in FIG. 1.

FIG. 4 is a schematic diagram illustrating operation of the positiondetection system during a pen-down event.

FIG. 5 is a schematic diagram illustrating operation of the positiondetection system during a pen-up event.

FIG. 6 is a flow chart regarding a position calculation operation of thestylus illustrated in FIG. 1.

FIG. 7 is a diagram illustrating a position calculation result of thestylus after calibration.

MODE FOR CARRYING OUT THE DISCLOSURE

Hereinafter, a preferred embodiment of a stylus and a positioncalculation method according to the present disclosure will be describedwith reference to the attached drawings. Note that the disclosure is notlimited to the embodiment described later, and it is obvious that thedisclosure can be freely changed without departing from the scope of thedisclosure. Alternatively, components may be arbitrarily combined aslong as there is no technical inconsistency.

<Configuration of Stylus 20>

FIG. 1 is an overall configuration diagram of a position detectionsystem 10 provided with a stylus 20 according to an embodiment of thepresent disclosure. The position detection system 10 basically includesthe stylus 20 that is a pen-type pointing device and an electronicdevice 30 as a touch device.

The stylus 20 includes a pen pressure switch 21, an inertial measurementunit (hereinafter, IMU 22), a micro control unit (hereinafter, MCU 23),and a communication chip 24.

The pen pressure switch 21 can detect a pen event including a pen-downevent and a pen-up event of the stylus 20. The pen pressure switch 21is, for example, a pressure sensor which includes a variable capacitorthat captures a change in a capacitance that changes when a pen tip ispressed.

The IMU 22 is, for example, a measurement unit with a combination of athree-axis gyro sensor and a three-way acceleration sensor. This allowsthe IMU 22 to measure the amount of movement of the stylus 20 in a pencoordinate system 40 (FIG. 2).

The MCU 23 is a control unit including a processor that can controloperation of the stylus 20. For example, the MCU 23 uses input signalsfrom the pen pressure switch 21 and the IMU 22 to calculate the positionof the stylus 20.

The communication chip 24 is an integrated circuit for wirelesslycommunicating with an external apparatus according to communicationstandards including BlueTooth (registered trademark). This allows thestylus 20 to receive a radio signal from the electronic device 30through the communication chip 24 and supply the received signal to theMCU 23.

The electronic device 30 is, for example, a tablet terminal, asmartphone, or a personal computer and includes a sensor electrode group32, a touch integrated circuit (IC) 33, a host processor 34, and acommunication chip 35. The user can hold the stylus 20 with one hand andmove the stylus 20 while pressing the pen tip against a touch surface 31to write a drawing or a character on the electronic device 30.

The sensor electrode group 32 is a cluster of electrodes that can detecta change in capacitance caused by an approach or contact of a conductor.The sensor electrode group 32 includes a plurality of X-line electrodesfor detecting the position of an Xd axis of a device coordinate system50 (FIG. 2) and a plurality of Y-line electrodes for detecting theposition of a Yd axis.

The touch IC 33 is an integrated circuit that controls driving of thesensor electrode group 32. The touch IC 33 drives the sensor electrodegroup 32 based on a control signal supplied from the host processor 34.In this way, the touch IC 33 executes a “pen detection function” fordetecting the state of the stylus 20 or a “touch detection function” fordetecting a touch by a finger or the like of the user.

The host processor 34 includes a processing operation apparatusincluding a central processing unit (CPU), a micro-processing unit(MPU), and a graphics processing unit (GPU). The host processor 34 canread and execute programs stored in a memory (not illustrated) toperform various functions including generation of ink data, creation ofa display image signal, and control of transmission and reception ofdata.

The communication chip 35 is an integrated circuit for wirelesslycommunicating with an external apparatus according to communicationstandards including BlueTooth (registered trademark). This allows theelectronic device 30 to transmit a radio signal including data, such assecond coordinate values described later, toward the stylus 20 throughthe communication chip 35.

FIG. 2 is a diagram illustrating a positional relationship between thepen coordinate system 40 and the device coordinate system 50. The pencoordinate system 40 is a three-dimensional coordinate system includingan Xp axis, a Yp axis, and a Zp axis with an origin Op. The origin Op isa reference point that can be freely set by the stylus 20. In addition,the directions of the axes Xp, Yp, and Zp depend on the definition ofeach axis in the IMU 22.

On the other hand, the device coordinate system 50 is athree-dimensional orthogonal coordinate system including an Xd axis, aYd axis, and a Zd axis with an origin Od. The origin Od is a fixed pointon the touch surface 31. The Xd-Yd plane coincides with a planedirection of the touch surface 31, and the Z axis coincides with anormal direction of the touch surface 31.

<Operation of Stylus 20>

The stylus 20 according to the embodiment is configured in this way.Next, a “position calibration operation” and a “position calculationoperation” of the stylus 20 will be described with reference to FIGS. 3to 7.

FIG. 3 is a flow chart regarding the position calibration operation ofthe stylus 20 illustrated in FIG. 1. Here, the “position calibrationoperation” is an operation for associating the pen coordinate system 40with the device coordinate system 50. Note that prior to the executionof the position calibration operation, the MCU 23 sets the referencepoint (for example, origin Op) of the pen coordinate system 40 and usesthe amount of movement successively measured by the IMU 22 tocontinuously calculate the position of the stylus 20 in the pencoordinate system 40.

At S1, the MCU 23 determines whether or not there is a pen eventgenerated by the stylus 20. It is desirable that the pen event is anevent that may occur under a normal mode of use, and specifically, thepen event includes a pen-up event or a pen-down event. Thepen-up/pen-down event is detected by capturing a change in a signal thatis output from the pen pressure switch 21. If the pen event is notdetected (S1: NO), the MCU 23 stays at S1 until the pen event isdetected. On the other hand, if the pen event is detected (S1: YES), theMCU 23 proceeds to S2.

At S2, the MCU 23 acquires coordinate values on the pen coordinatesystem 40 at occurrence positions 51 and 53 of the pen event detected atS2 (hereinafter, referred to as “first coordinate values”).

At S3, the MCU 23 acquires coordinate values on the device coordinatesystem 50 at the occurrence positions 51 and 53 of the pen eventdetected at S3 (hereinafter, referred to as “second coordinate values”).Hereinafter, a set of first coordinate values and second coordinatevalues acquired in the same pen event will be referred to as a“coordinate value pair.”

FIG. 4 is a schematic diagram illustrating operation of the positiondetection system 10 during a pen-down event. For example, when the userperforms a pen-down operation at the occurrence position 51 on the touchsurface 31, the pen pressure switch 21 is switched from “OFF” to “ON.”The MCU 23 uses a measurement signal supplied from the IMU 22 just afterthe reception of “pen-down” to acquire first coordinate values 4-1indicating the occurrence position 51. Along with this, the electronicdevice 30 is triggered by the reception of an uplink signal from thestylus 20 to transmit a downlink signal including second coordinatevalues 4-2 corresponding to the occurrence position 51. The MCU 23 usesthe downlink signal supplied from the communication chip 24 to acquirethe second coordinate values indicating the occurrence position 51.

FIG. 5 is a schematic diagram illustrating operation of the positiondetection system 10 during a pen-up event. For example, when the usermoves the pen tip from the occurrence position 51 (start point ofstroke) along a trajectory 52 and performs a pen-up operation at theoccurrence position 53 (end point of stroke), the pen pressure switch 21is switched from “ON” to “OFF.” The MCU 23 uses a measurement signaloutput from the IMU 22 just after the reception of “pen-up” to acquirefirst coordinate values 5-1 indicating the occurrence position 53. Alongwith this, the MCU 23 acquires second coordinate values 5-2 indicatingthe occurrence position 53 as in the case of pen-down.

At S4 of FIG. 3, the MCU 23 checks whether or not the number of obtainedsets of coordinate value pairs is sufficient for determining conversionparameters described later. If the sufficient number of sets are notobtained yet (S4: NO), the MCU 23 returns to S1 and then sequentiallyrepeats S1 to S4. On the other hand, if the sufficient number of sets (Nsets) are obtained (S4: YES), the MCU 23 proceeds to S5.

At S5, the MCU 23 uses the plurality of sets of coordinate value pairsacquired at S3 and S4 to determine the conversion parameters forconverting the coordinates from the pen coordinate system 40 into thedevice coordinate system 50. The conversion parameters are, for example,matrix elements for specifying the three-dimensional affinetransformation. In this case, twelve matrix elements and firstcoordinate values (Xp, Yp, Zp) are used to express second coordinatevalues (Xd, Yd, Zd) based on the following Equations 1 to 3.Xd=a·Xp+b·Yp+c·Zp+Tx  (Equation 1)Yd=d·Xp+e·Yp+f·Zp+Ty  (Equation 2)Zd=g·Xp+h·Yp+i·Zp+Tz  (Equation 3)

In this case, the degree of freedom of the conversion parameters is“12,” and simultaneous linear equations N=12/3=4 are solved to uniquelydetermine the values of all of the matrix elements. Alternatively, aconstraint condition (specifically, c=f=g=h=0) that takes into accountthe consistency in the vertical direction may be provided to reduce thedegree of freedom of the conversion parameters. Alternatively, N>4 maybe set, and an optimization method of minimizing a predetermined errorfunction may be used to determine the conversion parameters.

At S6, the MCU 23 uses the conversion parameters determined at S5 tocalibrate the current position of the stylus 20. Specifically, the MCU23 can convert the first coordinate values indicating the currentposition into the second coordinate values according to Equations (1) to(3). In this way, the position calibration operation of the stylus 20ends.

FIG. 6 is a flow chart regarding the position calculation operation ofthe stylus 20 illustrated in FIG. 1. Here, the “position calculationoperation” is an operation for calculating the position on the devicecoordinate system 50 while reflecting the calibration result of theposition.

At S7, the IMU 22 measures an amount of movement (ΔXp, ΔYp, ΔZp) of thestylus 20 in the pen coordinate system 40 and then supplies the amountof movement to the MCU 23.

At S8, the MCU 23 uses the conversion parameters determined at S5 andthe amount of movement (ΔXp, ΔYp, ΔZp) of the stylus 20 measured at S7to calculate the coordinate values (Xd, Yd, Zd) of the stylus 20 in thedevice coordinate system 50. Specifically, the MCU 23 sequentiallyconverts the coordinates of the amount of movement (S8 a of FIG. 6) andadds the amount of movement (S8 b of FIG. 6) to calculate and update thecoordinate values.

The coordinate value Xd (new) of this time is calculated by using thecoordinate value Xd (old) of the last time based on the followingEquation 4 and Equation 5.ΔXd=a·ΔXp+b·ΔYp+c·ΔZp+Tx  (Equation 4)Xd (new)=Xd (old)+ΔXd  (Equation 5)

The coordinate value Yd (new) of this time is calculated by using thecoordinate value Yd (old) of the last time based on the followingEquation 6 and Equation 7.ΔYd=d·ΔXp+e·ΔYp+f·ΔZp+Ty  (Equation 6)Yd (new)=Yd (old)+ΔYd  (Equation 7)

The coordinate value Zd (new) of this time is calculated by using thecoordinate value Zd (old) of the last time based on the followingEquation 8 and Equation 9.ΔZd=g·ΔXp+h·ΔYp+i·ΔZp+Tz  (Equation 8)Zd (new)=Zd (old)+ΔZd  (Equation 9)

As a result, the MCU 23 of the stylus 20 uses the amount of movement(ΔXp, ΔYp, ΔZp) of the stylus 20 successively measured by the IMU 22 tocalculate the three-dimensional position (Xd, Yd, Zd) of the stylus 20on the device coordinate system 50 as illustrated in FIG. 6. This allowsthe MCU 23 to determine whether or not the stylus 20 is above theelectronic device 30 or measure the clearance between the stylus 20 andthe electronic device 30.

In this way, the MCU 23 (processor) of the stylus 20 acquires the firstcoordinate values on the pen coordinate system 40 at the occurrenceposition of the pen event detected by the pen pressure switch 21 (pensensor) (S2 of FIG. 3) and acquires the second coordinate values on thedevice coordinate system 50 at the occurrence position of the pen event(S3 of FIG. 3). The MCU 23 uses the plurality of sets of coordinatevalue pairs to determine the conversion parameters for converting thecoordinates from the pen coordinate system 40 into the device coordinatesystem 50 (S5 of FIG. 3) and uses the determined conversion parametersand the measured amount of movement of the stylus 20 to calculate thecoordinate values of the stylus 20 in the device coordinate system 50(S8 of FIG. 6). As a result, after the conversion parameters aredetermined, the measurement results of the IMU 22 can be successivelyused to autonomously calculate the relative position between the stylus20 and the electronic device 30.

DESCRIPTION OF REFERENCE NUMERALS

10 Position detection system, 20 stylus, 21 pen pressure switch (pensensor), 22 IMU (inertial sensor), 23 MCU (processor), 24, 35communication chips, 30 electronic device, 31 touch surface, 32 sensorelectrode group, 33 sensor IC, 34 host processor, 40 pen coordinatesystem, 50 device coordinate system, 51, 53 occurrence positions.

What is claimed is:
 1. A stylus used with an electronic device that candetect a touch position of the stylus in a coordinate system of theelectronic device, the stylus comprising: a pen sensor which, inoperation, detects, by the stylus, either a pen-down event or a pen-upevent; an inertial sensor which, in operation, measures, by inertialsensor of the stylus, an amount of movement of the stylus in acoordinate system of the stylus, wherein the coordinate system of thestylus is a three-dimensional coordinate system including a plurality ofaxes corresponding to a plurality of axes included in the inertialsensor; and a processor which, in operation, acquires, by the inertialsensor of the stylus, first coordinate values in the coordinate systemof the stylus at an occurrence position of the pen event detected by thepen sensor, acquires, by a sensor of the stylus, second coordinatevalues in the coordinate system of the electronic device at theoccurrence position of the pen event, determines conversion parametersfor converting coordinates from the coordinate system of the stylus intothe coordinate system of the electronic device using a plurality of setsof coordinate value pairs, the coordinate value pairs being pairs of thefirst coordinate values and the second coordinate values, wherein thecoordinate system of the electronic device is a three-dimensionalcoordinate system including a plurality of axes that coincide with atouch surface of the electronic device, and wherein an origin of thecoordinate system of the electronic device is different from an originof the coordinate system of the stylus, and calculates coordinate valuesof the stylus in the coordinate system of the electronic device usingthe conversion parameters determined and the amount of movement of thestylus measured.
 2. The stylus according to claim 1, wherein the penevent is a pen-down event.
 3. The stylus according to claim 1, whereinthe pen event is a pen-up event.
 4. A position calculation methodperformed by a stylus used with an electronic device that can detect atouch position of the stylus in a coordinate system of the electronicdevice, the method comprising: detecting, by the stylus, either apen-down event or a pen-up event; measuring, by an inertial sensor ofthe stylus, an amount of movement of the stylus in a coordinate systemof the stylus, wherein the coordinate system of the stylus is athree-dimensional coordinate system including a plurality of axescorresponding to a plurality of axes included in the inertial sensor;acquiring, by the inertial sensor of the stylus, first coordinate valuesin the coordinate system of the stylus at an occurrence position of thepen event detected; acquiring, by a sensor of the stylus, secondcoordinate values in the coordinate system of the electronic device atthe occurrence position of the pen event; determining conversionparameters for converting coordinates from the coordinate system of thestylus into the coordinate system of the electronic device using aplurality of sets of coordinate value pairs, the coordinate value pairsbeing pairs of the first coordinate values and the second coordinatevalues, wherein the coordinate system of the electronic device is athree-dimensional coordinate system including a plurality of axes thatcoincide with a touch surface of the electronic device, and wherein anorigin of the coordinate system of the electronic device is differentfrom an origin of the coordinate system of the stylus; and calculatingcoordinate values of the stylus in the coordinate system of theelectronic device using the conversion parameters determined and theamount of movement of the stylus measured.
 5. The method according toclaim 4, wherein the acquiring of the first coordinate values isperformed by a processor of the stylus.
 6. The method according to claim4, wherein the acquiring of the second coordinate values is performed bya processor of the stylus.
 7. The method according to claim 4, whereinthe determining is performed by a processor of the stylus.
 8. The methodaccording to claim 4, wherein the calculating is performed by aprocessor of the stylus.